package com.ct.factory;

import com.ct.entity.po.TravelApproval;

import java.util.Date;

public class TravelApprovalFactory {
    public static TravelApproval create(String managerId, Integer travelId) {
        TravelApproval travelApproval = new TravelApproval();
        travelApproval.setManagerId(managerId);
        travelApproval.setTravelId(Math.toIntExact(travelId));
        travelApproval.setDate(new Date(System.currentTimeMillis()));
        return travelApproval;
    }
}
